<template>

    <!-- <el-tabs v-model="state.activeName" class="demo-tabs" @tab-click="handleClick" style=" padding: 0 18px;;">
        <el-tab-pane label="综合版" name="comprehensive">
            <div class="default-main ba-table-box">
                <Comprehensive ref="comprehensive" />
            </div>
        </el-tab-pane>
        <el-tab-pane label="采购版" name="purchase">
            <div class="default-main ba-table-box">
                <Purchase ref="purchase" />
            </div>
        </el-tab-pane>
        <el-tab-pane label="验货版" name="third">验货版</el-tab-pane>
    </el-tabs> -->

    <div class="default-main ba-table-box " style="border-radius: 3px;">
        <Comprehensive ref="comprehensive" />
    </div>
    

</template>

<script setup lang="ts">
import { onMounted, reactive, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import Comprehensive from './comprehensive.vue'
import Purchase from './purchase.vue'

// const { t } = useI18n()

const state = reactive({
    activeName: 'comprehensive'
})


const comprehensive = ref<{
    load();
}>();

const purchase = ref<{
    load();
}>();


const handleClick = (tab: TabsPaneContext, event: Event) => {
    let tabName = tab.props.name
    if(tabName == 'comprehensive'){
        comprehensive.value.load()
    }
    if(tabName == 'purchase'){
        purchase.value.load()
    }
    
}


onMounted(() => {
    comprehensive.value?.load();
})
</script>

<script lang="ts">
import { defineComponent } from 'vue'
// import { toLower } from 'lodash-es'
// import { throwError } from 'element-plus/es/utils'
export default defineComponent({
    name: 'userOrderMerge',
})
</script>

<style scoped lang="scss">
.ba-table-box{
    margin: 0;
}
</style>
